package com.iwuke.dance.http_request;

import java.util.List;
import java.util.Map;

import com.google.gson.Gson;
import com.iwuke.dance.util.LogUtil;
import com.iwuke.dance.wallet.bean.ECoinTopUpBean;
import com.iwuke.dance.wallet.bean.ListETransactionRecordBean;
import com.iwuke.dance.wallet.bean.QueryWalletBean;
import com.iwuke.dance.wallet.bean.RechargeEBalanceBean;
import com.iwuke.dance.wallet.mind_value.MindValueDetailsBean;
import com.iwuke.dance.wallet.starlight_value.starlight_value_bean.StarlightTransactionRecordBean;
import com.iwuke.dance.wallet.starlight_value.starlight_value_bean.StarlightTransactionRecordHomepageBean;
import com.iwuke.dance.wxapi.WXOpenBusinessViewBean;
import com.iwuke.dance.wxapi.WeChatCallbackBean;

public class PathUrl {

    public interface DataCallBack<T> {

        void onSucess(T object);

        void onFail(String errorCode);
    }

    public interface DataCallBackList<T> {
        void onSucessList(List<T> object);

        void onFail(String errorCode);
    }

    public interface DataCallBackMap<T> {
        void onSucessMap(Map<String,T> map);

        void onFail(String errorCode);
    }
    public static String baseUrl = BuildConfig.urlPath;
    public static String sendSMS = baseUrl + "/sendSMS";//发送短信
    public static String verifySMS = baseUrl + "/verifySMS";//验证短信
    public static String createByRealName = baseUrl + "/user/wallet/createByRealName";//创建钱包（初始化实名）
    public static String createByPassword = baseUrl + "/user/wallet/createByPassword";//创建钱包（设置密码）
    public static String queryByUserId = baseUrl + "/user/wallet/queryByUserId";//查询钱包（根据用户id）
    public static String rechargeEBalance = baseUrl + "/user/wallet/rechargeEBalance";//充值E币
    public static String getRechargeConfig = baseUrl + "/user/wallet/getRechargeConfig";//获取充值信息
    public static String eTransactionRecord = baseUrl + "/user/wallet/ETransactionRecord";//获取E币交易详细记录
    public static String starlightTransactionRecordHomepage = baseUrl + "/user/wallet/starlightTransactionRecordHomepage";//获取星光值交易交易记录(首页)
    public static String starlightTransactionRecord = baseUrl + "/user/wallet/starlightTransactionRecord";//获取星光值交易详细记录
    public static String starlightValueTransferWithdraw = baseUrl + "/user/wallet/starlightValueTransferWithdraw";//星光值提现

    public static String starlightTransactionLiveRecord = baseUrl + "/user/wallet/starlightTransactionLiveRecord";//获取星光值交易交易记录(直播收益明细)
    public static String transactionRecordHomepage = baseUrl + "/user/wallet/transactionRecordHomepage";//获取钱包主页余额交易记录(首页)
    public static String withdrawBalance = baseUrl + "/user/wallet/withdrawBalance";//提现钱包余额
    public static String transactionRecord = baseUrl + "/user/wallet/transactionRecord";//获取余额交易详情记录
    public static String getTransactionRecord = baseUrl + "/user/wallet/getTransactionRecord";//获取单条余额交易记录
    public static String mindValueDetails = baseUrl + "/user/wallet/";//心意值明细
    public static String verifyPassword = baseUrl + "/user/wallet/verifyPassword";//验证支付密码
    public static String changePasswordByOld = baseUrl + "/user/wallet/changePasswordByOld";//修改支付密码(根据原密码修改)
    public static String changePasswordByPhone = baseUrl + "/user/wallet/changePasswordByPhone";//修改支付密码(根据手机验证码修改)


    /**
     * @description 修改支付密码(根据手机验证码修改)
     * @param
     * @return
     * @author 魏从响
     * @time 2025/10/10 10:54
     */
    public static void changePasswordByPhone(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(changePasswordByPhone, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("修改支付密码(根据手机验证码修改)",changePasswordByPhone+"\n"+ response + "");
                BaseDataBean<Bean> bean = BaseDataPase.getBean(response);

                if (bean.success) {
                    dataCallBack.onSucess(bean.dataBean);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("修改支付密码(根据手机验证码修改)",changePasswordByPhone+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 修改支付密码(根据原密码修改)
     * @param
     * @return
     * @author 魏从响
     * @time 2025/10/10 10:53
     */
    public static void changePasswordByOld(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(changePasswordByOld, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("修改支付密码(根据原密码修改)",changePasswordByOld+"\n"+ response + "");
                BaseDataBean<Bean> bean = BaseDataPase.getBean(response);

                if (bean.success) {
                    dataCallBack.onSucess(bean.dataBean);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("修改支付密码(根据原密码修改)",changePasswordByOld+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 验证支付密码
     * @param
     * @return
     * @author 魏从响
     * @time 2025/10/10 10:33
     */
    public static void verifyPassword(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(verifyPassword, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("验证支付密码",verifyPassword+"\n"+ response + "");
                BaseDataBean<Bean> bean = BaseDataPase.getBean(response);

                if (bean.success) {
                    dataCallBack.onSucess(bean.dataBean);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("验证支付密码",verifyPassword+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 心意值明细
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/29 17:53
     */
    public static void mindValueDetails(Map<String,String> map,DataCallBackList<MindValueDetailsBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(mindValueDetails, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("心意值明细",mindValueDetails+"\n"+ response + "");
                BaseDataBean<MindValueDetailsBean> bean = BaseDataPase.getMindValueDetailsBean(response);

                if (bean.success) {
                    dataCallBack.onSucessList(bean.dataList);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("心意值明细",mindValueDetails+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 获取单条余额交易记录
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/28 14:16
     */
    public static void getTransactionRecord(Map<String,String> map,DataCallBack<StarlightTransactionRecordHomepageBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(getTransactionRecord, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取单条余额交易记录",getTransactionRecord+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordHomepageBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordHomepage(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取单条余额交易记录",getTransactionRecord+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 获取余额交易详情记录
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/26 13:56
     */
    public static void transactionRecord(Map<String,String> map,DataCallBackList<StarlightTransactionRecordBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(transactionRecord, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取余额交易详情记录",transactionRecord+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取余额交易详情记录",transactionRecord+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 获取钱包主页余额交易记录(首页)
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/26 11:17
     */
    public static void transactionRecordHomepage(Map<String,String> map,DataCallBackList<StarlightTransactionRecordHomepageBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(transactionRecordHomepage, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取钱包主页余额交易记录(首页)",transactionRecordHomepage+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordHomepageBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordHomepageBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取钱包主页余额交易记录(首页)",transactionRecordHomepage+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 获取星光值交易交易记录(直播收益明细)
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/24 14:27
     */
    public static void starlightTransactionLiveRecord(Map<String,String> map,DataCallBackList<StarlightTransactionRecordHomepageBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(starlightTransactionLiveRecord, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取星光值交易交易记录(直播收益明细)",starlightTransactionLiveRecord+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordHomepageBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordHomepageBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取星光值交易交易记录(直播收益明细)",starlightTransactionLiveRecord+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 余额提现
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/26 13:50
     */
    public static void withdrawBalance(Map<String,Object> map,DataCallBack<WXOpenBusinessViewBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(withdrawBalance, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("余额提现",withdrawBalance+"\n"+ response + "");
                BaseDataBean<WXOpenBusinessViewBean> bean = BaseDataPase.getWXOpenBusinessViewBean(response);

                if (bean.success) {
                    dataCallBack.onSucess(bean.dataBean);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("余额提现",withdrawBalance+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 星光值提现
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/22 16:42
     */
    public static void starlightValueTransferWithdraw(Map<String,Object> map,DataCallBack<WXOpenBusinessViewBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(starlightValueTransferWithdraw, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("星光值提现",starlightValueTransferWithdraw+"\n"+ response + "");
                BaseDataBean<WXOpenBusinessViewBean> bean = BaseDataPase.getWXOpenBusinessViewBean(response);

                if (bean.success) {
                    dataCallBack.onSucess(bean.dataBean);
                } else {
                    dataCallBack.onFail(bean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("星光值提现",starlightValueTransferWithdraw+"\n"+ httpException.errMsg + "");
            }
        });
    }

    public static void userInformation(String url,Map<String,String> map,DataCallBack<WeChatCallbackBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(url, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取微信用户信息",url+"\n"+ response + "");

                WeChatCallbackBean bean = new Gson().fromJson(response, WeChatCallbackBean.class);
                dataCallBack.onSucess(bean);
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取微信用户信息",url+"\n"+ httpException.errMsg + "");
            }
        });
    }

    public static void withdraw(String url,Map<String,String> map,DataCallBack<WeChatCallbackBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(url, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取微信openid",url+"\n"+ response + "");

                WeChatCallbackBean bean = new Gson().fromJson(response, WeChatCallbackBean.class);
                dataCallBack.onSucess(bean);
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取微信openid",url+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 获取星光值交易详细记录
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/20 15:19
     */
    public static void starlightTransactionRecord(Map<String,String> map,DataCallBackList<StarlightTransactionRecordBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(starlightTransactionRecord, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取星光值交易详细记录",starlightTransactionRecord+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取星光值交易详细记录",starlightTransactionRecord+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 获取星光值交易交易记录(首页)
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/20 14:40
     */
    public static void starlightTransactionRecordHomepage(Map<String,String> map,DataCallBackList<StarlightTransactionRecordHomepageBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(starlightTransactionRecordHomepage, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取星光值交易交易记录(首页)",starlightTransactionRecordHomepage+"\n"+ response + "");
                BaseDataBean<StarlightTransactionRecordHomepageBean> refundCalculationBean = BaseDataPase.getStarlightTransactionRecordHomepageBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取星光值交易交易记录(首页)",starlightTransactionRecordHomepage+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 获取E币交易详细记录
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/19 13:19
     */

    public static void eTransactionRecord(Map<String,String> map,DataCallBackList<ListETransactionRecordBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(eTransactionRecord, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取E币交易详细记录",eTransactionRecord+"\n"+ response + "");
                BaseDataBean<ListETransactionRecordBean> refundCalculationBean = BaseDataPase.getListETransactionRecordBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取E币交易详细记录",eTransactionRecord+"\n"+ httpException.errMsg + "");
            }
        });
    }


//    public static void eTransactionRecord(Map<String,String> map,DataCallBackMap dataCallBack) {
//        NetManger.getRequest(OKHttpRequest.class).doGet(eTransactionRecord, map, new IResponseListener() {
//            @Override
//            public void onResponse(String response) {
//                LogUtil.logD("获取E币交易详细记录",eTransactionRecord+"\n"+ response + "");
//                BaseDataBean<ETransactionRecordBean> refundCalculationBean = BaseDataPase.getETransactionRecordBean(response);
//
//                if (refundCalculationBean.success) {
//                    dataCallBack.onSucessMap(refundCalculationBean.dataMap);
//                } else {
//                    dataCallBack.onFail(refundCalculationBean.errorMessage);
//                }
//            }
//
//            @Override
//            public void onFail(HttpException httpException) {
//                dataCallBack.onFail(httpException.errMsg);
//                LogUtil.logD("获取E币交易详细记录",eTransactionRecord+"\n"+ httpException.errMsg + "");
//            }
//        });
//    }


    /**
     * @description 获取充值信息
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/19 13:19
     */
    public static void getRechargeConfig(Map<String,String> map,DataCallBackList<ECoinTopUpBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(getRechargeConfig, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("获取充值信息",getRechargeConfig+"\n"+ response + "");
                BaseDataBean<ECoinTopUpBean> refundCalculationBean = BaseDataPase.getRechargeConfigBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucessList(refundCalculationBean.dataList);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("获取充值信息",getRechargeConfig+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 充值E币
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/18 14:27
     */
    public static void rechargeEBalance(Map<String,Object> map,DataCallBack<RechargeEBalanceBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(rechargeEBalance+"/1", map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("充值E币",rechargeEBalance+"\n"+ response + "");
                BaseDataBean<RechargeEBalanceBean> refundCalculationBean = BaseDataPase.getRechargeEBalanceBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("充值E币",rechargeEBalance+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 查询钱包（根据用户id）
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/17 18:23
     */
    public static void queryByUserId(Map<String,String> map,DataCallBack<QueryWalletBean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doGet(queryByUserId, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("查询钱包（根据用户id）",queryByUserId+"\n"+ response + "");
                BaseDataBean<QueryWalletBean> refundCalculationBean = BaseDataPase.getQueryWalletBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("查询钱包（根据用户id）",queryByUserId+"\n"+ httpException.errMsg + "");
            }
        });
    }


    /**
     * @description 创建钱包（设置密码）
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/16 16:43
     */
    public static void createByPassword(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(createByPassword, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("创建钱包（设置密码）",createByPassword+"\n"+ response + "");
                BaseDataBean<Bean> refundCalculationBean = BaseDataPase.getBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("创建钱包（设置密码）",createByPassword+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 创建钱包（初始化实名）
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/16 16:43
     */
    public static void createByRealName(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(createByRealName, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("创建钱包（初始化实名）",createByRealName+"\n"+ response + "");
                BaseDataBean<Bean> refundCalculationBean = BaseDataPase.getBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("创建钱包（初始化实名）",createByRealName+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 验证短信
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/16 16:43
     */
    public static void verifySMS(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(verifySMS, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("验证短信",verifySMS+"\n"+ response + "");
                BaseDataBean<Bean> refundCalculationBean = BaseDataPase.getBean(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("验证短信",verifySMS+"\n"+ httpException.errMsg + "");
            }
        });
    }

    /**
     * @description 发送短信
     * @param
     * @return
     * @author 魏从响
     * @time 2025/9/16 14:12
     */
    public static void sendSMS(Map<String,Object> map,DataCallBack<Bean> dataCallBack) {
        NetManger.getRequest(OKHttpRequest.class).doPostJson(sendSMS, map, new IResponseListener() {
            @Override
            public void onResponse(String response) {
                LogUtil.logD("发送短信",sendSMS+"\n"+ response + "");
                BaseDataBean<Bean> refundCalculationBean = BaseDataPase.getBean2(response);

                if (refundCalculationBean.success) {
                    dataCallBack.onSucess(refundCalculationBean.dataBean);
                } else {
                    dataCallBack.onFail(refundCalculationBean.errorMessage);
                }
            }

            @Override
            public void onFail(HttpException httpException) {
                dataCallBack.onFail(httpException.errMsg);
                LogUtil.logD("发送短信",sendSMS+"\n"+ httpException.errMsg + "");
            }
        });
    }

}
